package com.frank.subject.common.entity;

/**
 * @author Frank Zou
 * @version v0.0.1
 * @date 2024/1/26 12:48
 * @description 自定义分页实体类
 */
public class PageInfo {

    /**
     * 当前页
     */
    private Integer current;

    /**
     * 每页条数
     */
    private Integer pageSize;


    public Integer getCurrent() {
        if (current == null || current < 1) {
            return 1;
        }
        return current;
    }

    public Integer getPageSize() {
        if (pageSize == null || pageSize < 1) {
            return 20;
        }
        return pageSize;
    }
}
